<?php

namespace App\Http\Requests\Admin\Links;
use App\Http\Requests\Request;

class CreateRequest extends Request{
    public function authorize(){
        return true;
    }
    public function rules(){
        return [
            'link_name' => 'required',
            'link_url' => 'required|check_link',
            'link_site' => 'required',
            'link_sort' => 'integer',
        ];
    }
    public function messages(){
        return [
            'link_name.required' => '友情链接名称必须填写',
            'link_url.check_link' => '友情链接地址不正确',
            'link_url.required' => '友情链接地址必须填写',
            'link_site.required' => '请选择友情站点',
            'link_sort.integer' => '友情排序必须是整数',
        ];
    }
}